import java.util.Scanner;
import java.util.Random;
public class Hilo
{
    public static void main(String[]args)
       {
           int num1,num2;
           int count = 0;
           int max = 100;
           int min = 1;
           int s; 
           String NO;
          
           Scanner scan = new Scanner(System.in);
           Random g = new Random();
           do{
           
           num1 = g.nextInt(100) + 1;
           
           System.out.print("Enter the number" + min + "~" + max + ":");
           
           num2 = scan.nextInt();
           count++;
              
           if (num1<num2)
              System.out.println("Too large");
           else
              if(num1>num2)
                  System.out.println("Too small");
              else
                  System.out.println("You guess it" + count + "times");
           
        
              
              System.out.println("Input 1 to continue or 2 to break:");
              s = scan.nextInt();
              if(s>2)
               { System.out.println("wrong");
                System.out.println("please intput again:");
                s = scan.nextInt();}       
                 
           }
           while(s<2);
           System.out.println("game over");   
         }
}     
                
             
                
                
              
             
               
             
             
              
             
            
            
  
             
            
              
              
    
       
         
           
